package com.boat.sample.ddd.infrastructure.client.response;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class LxrResponse<T> {
	private static final int SUCC_CODE = 1;
	/**
	 * 接口返回响应码
	 */
	private int code;
	/**
	 * 接口返回消息
	 */
	private String message;
	/**
	 * 第三方响应结果
	 */
	private T data;

	public boolean isSuccess() {
		return SUCC_CODE == code;
	}

}